package sms.ui.xuesheng;

import sms.dao.XueShengDao;
import sms.entry.XueSheng;
import sms.ui.XueShengGuanLi;

import java.util.Scanner;

public class XueShengDelete {
    private static XueShengDao xueShengDao = new XueShengDao();
    public static void show(){
        System.out.println("请输入要删除学生的学号和姓名");
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入学生学号：");
        int xuehao = sc.nextInt();
        System.out.println("请输入学生姓名：");
        String name = sc.next();
        //调用XueShengDao中的删除方法
        XueSheng xueSheng = new XueSheng(xuehao, name);
        xueShengDao.remove(xueSheng);
        System.out.println("已删除");
        //返回学生档案管理界面
        XueShengGuanLi.show();
    }
}
